import 'package:flutter/material.dart';
import 'package:flutter_aggregate/model/onlineOrder/constants.dart';
import 'package:flutter_svg/flutter_svg.dart';

class OnlineDetailOrderButton extends StatelessWidget {
  const OnlineDetailOrderButton({
    Key? key, required this.prees,
  }) : super(key: key);

  final VoidCallback prees;

  @override
  Widget build(BuildContext context) {
    Size size = MediaQuery.of(context).size;
    return Container(
      width: size.width * 0.8,
      decoration: BoxDecoration(
        color: onlineOrderKPrimaryColor,
        borderRadius: BorderRadius.circular(10)
      ),
      child: Material(
        color: Colors.transparent,
        child: InkWell(
          onTap: prees,
          child: Padding(
            padding: const EdgeInsets.all(20),
            child: Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                SvgPicture.asset('assets/online/icons/bag.svg'),
                const SizedBox(width: 10),
                const Text(
                  'Order Now',
                  style: TextStyle(
                    color: Colors.white,
                    fontSize: 18,
                    fontWeight: FontWeight.bold
                  ),
                )
              ],
            ),
          ),
        ),
      ),
    );
  }
}